package products;

public class Main {
	public static void main (String[] args) {
		Product product = new Product("ProdusA","PantalonVerde",50.00);
		System.out.println("Produs");
		System.out.println(product);
		
		ProductStateMemory memory = new ProductStateMemory();
		memory.setMemento(product.memento());
		
		product.setName("Produs A(2)");
		product.setDescription("Am modificat.");
		product.setCost(60.00);
		
		System.out.println("\nProdus 2");
		System.out.println(product);
		
		product.restoreMemento(memory.getMemento());
		System.out.println("\nProdus 3");
		System.out.println(product);	
	}
}
